package bishizhuanyong.美团;

import java.util.Arrays;
import java.util.Scanner;

public class meituan3 {

    public static int[] dp;
    public static int[] pos4dp;
    public static void main(String[] args) {
        Scanner s=new Scanner(System.in);
        //num of city
        int n = s.nextInt();
        //days
        int m = s.nextInt();
        //orginal pos
        int k = s.nextInt();
        //pos
        int[] poses=new int[m];
        //profit_dont change pos
        int[] profitdg=new int[m];
        //
        int[] profitg=new int[m];
        for (int i=0;i<m;i++)
            poses[i]=s.nextInt();
        for (int i=0;i<m;i++)
            profitdg[i]=s.nextInt();
        for (int i=0;i<m;i++)
            profitg[i]=s.nextInt();
        dp=new int[m];
        pos4dp=new int[m];
        Arrays.fill(dp,Integer.MIN_VALUE);
        int maxProfit=process(poses,profitdg,profitg,k,0);
        System.out.println(maxProfit);
    }

    public static int process(int[] poses,int[] dg,int[] g,int curpos,int curday){
        if (curday==poses.length) {
            return 0;
        }else {


        }
        //do the job
        int task_pos=poses[curday];
        int max=Integer.MIN_VALUE;
        if (task_pos==curpos){
            max=dg[curday]+process(poses,dg,g,curpos,curday+1);
        }else
            max=g[curday]+process(poses,dg,g,task_pos,curday+1);
        //dont do the job
        int max2=process(poses,dg,g,curpos,curday+1);
        dp[curday]=Math.max(max,max2);
        pos4dp[curday]=curpos;
        return dp[curday];
    }
}
